package cn.ligoo.part.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.ligoo.part.dao.UserRoleDao;
import cn.ligoo.part.domain.UserRole;
import cn.ligoo.part.service.UserRoleService;

/**
 * @author Jin,QingHua
 * @version 2012-07-17 16:46:31
 */
@Service
public class UserRoleServiceImpl implements UserRoleService {

	@Resource
	private UserRoleDao userRoleDao;

	@Override
	public Integer createUserRole(UserRole t) {
		this.userRoleDao.insertEntity(t);
		return t.getId();
	}

	@Override
	public int modifyUserRole(UserRole t) {
		return this.userRoleDao.updateEntity(t);
	}

	@Override
	public int removeUserRole(UserRole t) {
		return this.userRoleDao.deleteEntity(t);
	}

	@Override
	public UserRole getUserRole(UserRole t) {
		return this.userRoleDao.selectEntity(t);
	}

	@Override
	public Integer getUserRoleCount(UserRole t) {
		return this.userRoleDao.selectEntityCount(t);
	}

	@Override
	public List<UserRole> getUserRoleList(UserRole t) {
		return this.userRoleDao.selectEntityList(t);
	}

}
